package com.cwj;

import org.openjdk.jol.info.ClassLayout;
import sun.misc.Contended;

/**
 * @author: Chenwujie
 * @date: 2021-03-29 10:17
 * VM options: -XX:-RestrictContended
 */
public class CacheLineTest {
    public static void main(String[] args) {
        CacheLineValue cacheLineValue = new CacheLineValue();
        System.out.println(ClassLayout.parseInstance(cacheLineValue).toPrintable());
    }
    public static class CacheLineValue{
        @Contended
        private volatile int value;
    }
}
